<?php

require_once('../include/GeneralTop.php');
require('../include/class/db.php');

if ((isset($_POST["submit"]))) {
    $insertSQL = sprintf("INSERT INTO helpmanual (helpmal_title, helpmal_info, helpmal_author) VALUES (%s, %s, %s)",
                       GetSQLValueString($_POST['helpmal_title'], "text"),
					   GetSQLValueString($_POST['helpmal_info'], "text"),
                       GetSQLValueString($_POST['helpmal_author'], "text")
                      
                       );

    $db->query($insertSQL);
    header("location:".$_SERVER['PHP_SELF']."?result=suc");
}

include('AdminPanel.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
  <table align="center">
    <?php
    if($_GET['result'] && 'suc' == $_GET['result']) {
    ?>
    <tr valign="baseline">
      <td colspan="2" nowrap="nowrap" align="center"><font color="green">添加成功...</font></td>
    </tr>
    <?php
    }
    ?>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">
      </select>
       helpmal_title:</td>
      <td><input type="text" name="helpmal_title" value="" size="32" /></td>
    </tr>
    <tr valign="baseline">
      <td nowrap="nowrap" align="right" valign="top">helpmal_info:</td>
      <td><textarea name="helpmal_info" cols="50" rows="5"></textarea></td>
    </tr>
    <<tr valign="baseline">
      <td nowrap="nowrap" align="right">helpmal_author:</td>
      <td><input type="text" name="helpmal_author" value="" size="32" /></td>
    </tr>
    
    <tr valign="baseline">
      <td nowrap="nowrap" align="right">&nbsp;</td>
      <td><input type="submit" value="Insert record" /></td>
    </tr>
  </table>

  <input type="hidden" name="MM_insert" value="form1" />
</form>
<p>&nbsp;</p>
</body>
</html>